#coding:utf8
from django.conf.urls import url
from . import views
from rest_framework_jwt.views import obtain_jwt_token
urlpatterns = [

    #/users/usernames/(?P<username>\w{5,20})/count/
    url(r'^usernames/(?P<username>\w{5,20})/count/$',views.RegisterUsernameView.as_view()),

    #/users/phones/(?P<mobile>1[345789]\d{9})/count/
    url(r'^phones/(?P<mobile>1[345789]\d{9})/count/$',views.RegisterMobileView.as_view()),

    url(r'^$',views.CreateUserView.as_view()),

    #进行登录认证,返回token
    #/users/auths/
    #eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6IiIsInVzZXJuYW1lIjoiaXRjYXN0IiwidXNlcl9pZCI6NCwiZXhwIjoxNTMxMDMzODczfQ.M_sDLtM5bPJd-hgVYypcoQs6iuylSmM7Fn8PtXeK004
    url(r'^auths/$',obtain_jwt_token),

    #/users/infos/
    url(r'^infos/$',views.UserCenterInfoView.as_view()),

    url(r'^email/$',views.EmailView.as_view()),

#/users/emails/verification/
    url(r'^emails/verification/$',views.VerifyEmailView.as_view()),
]